package exe2;

public class Person extends Actor {

	private Vehicle vehicle;
	
	public Person() {
		name = "person";
		v = 2;
	}
	
	@Override
	public int go(City city) {
		int days = 0;
		int drift = 0;
		int distance = city.getDistance();
		
		while(true) {
			vehicle = AbstractVehicle.getVehicle();
			int velocity = vehicle.speedUp() + v;
			drift+=velocity;
			days++;			
			if (drift > distance) {
				break;
			}
		}
		return days;
	}

}
